<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript" src="js/util.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="css/select.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="artDialog/skins/default.css"
	type="text/css"></link>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/select-ui.min.js"></script>
<script type="text/javascript" src="artDialog/artDialog.min.js"></script>
<script type="text/javascript" src="artDialog/jquery.artDialog.min.js"></script>
<script type="text/javascript" src="artDialog/artDialog.plugins.min.js"></script>
<script language="javascript"  type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/util.js"></script>
<script type="text/javascript" src="js/myCook.js"></script>

<script type="text/javascript">
	
	$(function(){
	
	shoPole(1,10);
	
	$(".select3").uedSelect({
		width : 120
	});
	
	$.post("pole!findAll.action",function(data){
		var arr = eval("("+data+")");
		var html = $("#poleNo").html();
		for(var i =0;i<arr.length;i++){
			html+="<option value='"+arr[i].id+"'>"+arr[i].id+"</option>";
			
		}
		$("#poleNo").html(html);
	
	}); 
	
	});
	
	
	
	function changeEnabled(lng,lat){
	/* document.cookie="popped=yes"
		cookie.set("lng",lng);
		cookie.set("lat",lat); */
		
		setCookie("lng",lng);
		setCookie("lat",lat);
		delCookie("count");
		location.href="demo.html";
				
	}
	

  function shoPole(pageIndex,pageSize){
   var id = $("#poleNo").val();
	$.post("pole!showPole.action",{
			"pageIndex":pageIndex,
			"pageSize" : pageSize,
			"id":id
		},function(data){
			var bean = eval("("+data+")");
			var rows = bean.rows;
			var html="";
			/* var level=["一般","严重","紧急"]; */
			for(var i =0;i<rows.length;i++){
				html+="<tr><td>"+rows[i].id+"</td>";
				html+="<td>"+rows[i].lng+"</td>";
				html+="<td>"+rows[i].lat+"</td>";
				html+="<td>"+rows[i].state+"</td>";
				html+="<td><a onclick=changeEnabled("+rows[i].lng+","+rows[i].lat+");>地图查看</a></td></tr>";
			}
			$("#info_list").html(html);
			var pager = pager2(bean,pageSize,"shoPole");
			$(".pagin").html(pager);
			$('#info_list tr:odd').addClass('odd');
		});
			}
			
</script>

</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">塔杆管理</a></li>
    <li><a href="#">塔杆信息</a></li>
    </ul>
    </div>
    
   
      <div class="formbody">
       
    <ul class="seachform">
    
   
    <li><label>杆塔编号</label>
     <div class="vocation">
    <select class="select3" id="poleNo" name="circuitry.poleByEndpoleNo.id">
    <option value="0">请选择</option>
    </select>
    </div>
    </li>

    <li><label>&nbsp;</label><input name="" type="button" class="scbtn" value="查询" onclick="shoPole(1,10)"/></li>
    
    </ul>
    
      
	</div>   
     
     
      
   <table class="tablelist">
    	<thead>
    	<tr>
        <th>塔杆编号</th>
        <th>塔杆经度</th>
        <th>塔杆纬度</th>
        <th>状态</th>
        <th>查看</th>
        </tr>
        </thead>
        <tbody id="info_list">
       		
        </tbody>
    </table>
 
	<div class="pagin">
     </div>
    
    
</body>
</html>
